home *** CD-ROM | disk | FTP | other *** search
/ Champak 26 (Anniversary Edition) / Volume 26 [Anniversary Edition] - JOGO DISK .iso / DEPOSITO / REmovido / Nave / avenger.swf / scripts / DefineSprite_275 / frame_1 / DoAction.as
Text File  |  2006-07-26  |  1KB  |  52 lines

  1. this.onPress = function()
  2. {
  3.    pressing = true;
  4.    i = 1;
  5.    while(i <= 3)
  6.    {
  7.       buttonColor = new Color(eval("piece" + i).colorchip);
  8.       buttonColor.setRGB(3355443);
  9.       lowColor = new Color(eval("piece" + i).bottomhilite);
  10.       lowColorTransform = new Object();
  11.       lowColorTransform = {ra:"0",rb:"200",ga:"0",gb:"200",ba:"0",bb:"200",aa:"100",ab:"0"};
  12.       lowColor.setTransform(lowColorTransform);
  13.       i++;
  14.    }
  15. };
  16. this.onRelease = function()
  17. {
  18.    pressing = false;
  19. };
  20. this.onReleaseOutside = function()
  21. {
  22.    pressing = false;
  23. };
  24. this.onEnterFrame = function()
  25. {
  26.    if(pressing != true)
  27.    {
  28.       i = 1;
  29.       while(i <= 3)
  30.       {
  31.          buttonColor = new Color(eval("piece" + i).colorchip);
  32.          buttonColor.setRGB(rgb);
  33.          lowColor = new Color(eval("piece" + i).bottomhilite);
  34.          lowColorTransform = new Object();
  35.          lowColorTransform = {ra:"0",rb:hc1,ga:"0",gb:hc2,ba:"0",bb:hc3,aa:"100",ab:"0"};
  36.          lowColor.setTransform(lowColorTransform);
  37.          i++;
  38.       }
  39.    }
  40. };
  41. with(piece2)
  42. {
  43.    _width = _parent.wide;
  44.    piece1._x = _x - _width / 2;
  45.    piece3._x = _x + _width / 2;
  46.    _parent.midshadow._width = _width;
  47.    _parent.leftshadow._x = _x - _width / 2;
  48.    _parent.rightshadow._x = _x + _width / 2;
  49. }
  50. label1.autoSize = "center";
  51. label2.autoSize = "center";
  52.